
#ifndef DIRECTX_API_I
#define DIRECTX_API_I

#include "APIInterface.h"

class DirectXInterface : public APIInterface
{
public:

	struct VertexPos
	{
		XMFLOAT3 pos;
		XMFLOAT2 tex0;
	};

	DirectXInterface(){};
	bool Initialize(HINSTANCE hInstance, HINSTANCE prevInstance,
		LPWSTR cmdLine, int cmdShow, WNDPROC wndProc, unsigned int width, unsigned int height);

	virtual bool Update(); // update the game. If return false an error has occured
	virtual bool Render(); // render the game
	virtual bool LoadContent();
	virtual bool UnloadContent();
	virtual bool ShutDown(); // turn off the library and clear the memory


	bool CompileD3DShader( char* filePath, char* entry,
                               char* shaderModel, ID3DBlob** buffer );

	
	HINSTANCE hInstance_;
    HWND hwnd_;

    D3D_DRIVER_TYPE driverType_;
    D3D_FEATURE_LEVEL featureLevel_;
	

    ID3D11Device* d3dDevice_;
    ID3D11DeviceContext* d3dContext_;
    IDXGISwapChain* swapChain_;
    ID3D11RenderTargetView* backBufferTarget_;

	ID3D11BlendState* alphaBlendState;

	ID3D11Buffer* mvpCB_;

	XMFLOAT4X4 viewProjectionMatrix;


};

#endif